package org.shj.pattern.template

abstract class Game {
  def init()
  def start()
  def stop()
  
  final def play(){
    init()
    start()
    stop()
  }
}

class FootballGame extends Game{
  def init(){
    println("init football game")
  }
  
  def start(){
    println("start football game")
  }
  
  def stop(){
    println("stop football game")
  }
}

class VideoGame extends Game{
  def init(){
    println("init Vedio game")
  }
  
  def start(){
    println("start Vedio game")
  }
  
  def stop(){
    println("stop Vedio game")
  }
}

